<?php
/**
 * Medical Monitoring Header Block.
 * This component contains all header field of
 * a medical center monitoring.
 * 
 * @author Xavier VILAIN
 * @package Nawa\MedicalStudy\MedicalCenter\Monitoring
 * @license #license-nawa#
 * 
 */
use Fox\Generator;
use Nawa\MedicalStudy\MedicalCenter\Monitoring;
use Fox\Html\DropList;
use Fox\Html\Input;
use Fox\Html\Block;
use Nawa\MedicalStudy\MedicalCenter\Monitoring\Type;
$xview = Xview::instance();
$block = new Block('bMonitoringHeader',Msg(Fox\Msg::BUNDLE,Fox\Msg::MSG_HEADER_DATA));
$block->add(new Input('monitoringid'));
$block->add(new Input('monitoring_date',true));
// Load all monitorings Status
$statuses = Fox\Dao::finder(Monitoring\Status::className())
	->where('active = ? AND loekz = ?',array(1,0))
		->find();

$block->add(new DropList(array('monitoring_status','status'),false,false,true,1))
	->options($statuses,'status',Generator::call('label'));
// Type Of Monitoring Interview
$interviewTypes = Fox\Dao::finder(Nawa\MedicalStudy\MedicalCenter\Monitoring\Interview\Type::className())
					->find();
$block->add(new DropList\Radio(array('mo_interview_type','interview_type'),false,true,2))
	->options($interviewTypes,'interview_type',Generator::call('label'));

$categories = \Fox\Dao::finder(Nawa\Survey\Category::className())
				->where('domain = ?',array(Nawa\MedicalStudy::DOMAIN_MEDICAL_STUDY))
				->find();
$block->add(new DropList(array('monitoring_type','category'),true,false,true))
	->options($categories,'category',Generator::call('label'));
return $block;